﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
using ProducerBO;

namespace producer
{
    public partial class CustomerClips : System.Web.UI.Page
    {
        //Clipdetail cd = new Clipdetail();
        SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["ConnStr"]);
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                
                    BindData();
                    //con.Open();
                    //ViewState["sortOrder"] = "";
              
            }
        }
        private void BindData()
        {
            con.Open();
            string str = "SELECT CLIPD_PHOTO FROM CLIPDETAIL";
            SqlCommand cmd = new SqlCommand(str, con);
            SqlDataAdapter da = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            da.Fill(ds);
            GridView1.DataSource = ds;
            GridView1.DataBind();
            //con.Close();

        }

        protected void Search_Click(object sender, EventArgs e)
        {
            //con.Open();
            //string str = "SELECT CLIP_ID FROM CLIPINFO";
            //SqlCommand cmd = new SqlCommand(str, con);
            //SqlDataAdapter da = new SqlDataAdapter(cmd);
            //DataSet ds = new DataSet();
            //da.Fill(ds);
            //GridView1.DataSource = ds;
            //GridView1.DataBind();
        }
    }
}
